<form method="post" id="frmSearch" action="<?= base_url() ?>registermanual/allalumni/">
    <div style="text-align: center;vertical-align: middle;">
        <select name="ddAngkatan" id="ddAngkatan">
            <option value="">Semua Angkatan</option>
            <? foreach (getAngkatan() as $k => $v): ?>
                <option value="<?= $v->year ?>"<?= $v->year == $ddAngkatan ? ' selected="selected"' : "" ?>><?= $v->name ?></option>
            <? endforeach; ?>
        </select>
        <input type="text" name="txtSearch" id="txtSearch" value="<?= @$txtSearch ?>"/>
        <input type="submit" class="btn-primary" value="Cari"/>
    </div>
</form>
<table class="table table-bordered table-striped responsive-utilities">
    <thead>
        <tr>
            <th>Nama</th>
            <th>Jenkel</th>
            <th>Angkatan</th>
            <th>Kelas</th>
        </tr>
    </thead>
    <tbody>
        <? if (@$alumni) : ?>
            <? foreach ($alumni as $k => $v) : ?>
                <tr>
                    <td><?= $v->name ?></td>
                    <td><?= $v->gender ?></td>
                    <td><?= getAngkatanName($v->graduateyear) ?></td>
                    <td><?= $v->kelas ?></td>
                </tr>
            <? endforeach; ?>
            <? if ($this->paginationpopup->create_links() <> "") : ?>
                <tr>
                    <th colspan="4" style="text-align: center;"><?php echo $this->paginationpopup->create_links(); ?></th>
                </tr>
            <? endif; ?>
        <? else : ?>
            <tr>
                <td colspan="4">Tidak ada data yang tersedia</td>
            </tr>
        <? endif; ?>
    </tbody>
</table>
<script>
    function pageClick(page){
        var action = $("#frmSearch").attr("action");
        $("#frmSearch").attr("action", action + page);
        $("#frmSearch").submit();
    };
</script>